package sgi.details_new;

import java.awt.Dimension;

import sgi.misc.FloatDimension;

public class ImageDetails implements java.io.Serializable {
	
	private int imageid;
	private String date;
	private String location;
	private String type;
	private FloatDimension coordinates;
	private boolean hasSample;
	
	public int getImageid() {
		return imageid;
	}
	
	public ImageDetails(int imageid,String date, String location, FloatDimension coordinates)
	{
		setImageid(imageid);
		setDate(date);
		setLocation(location);
		setCoords(coordinates);
	}
	
	public ImageDetails(int imageid, String date, String location)
	{
		setImageid(imageid);
		setDate(date);
		setLocation(location);
	}
	
	public ImageDetails(String type,int imageid,String date, String location)
	{
		setImageid(imageid);
		setDate(date);
		setLocation(location);
		setType(type);
	}
	
	public ImageDetails(int imageid)
	{
		setImageid(imageid);
	}
	
	public ImageDetails(int imageid,boolean hasSample)
	{
		setImageid(imageid);
		setHasSample(hasSample);
	}
	
	public ImageDetails(String type,int imageid,String date, String location,FloatDimension coordinates)
	{
		setImageid(imageid);
		setDate(date);
		setLocation(location);
		setType(type);
		setCoords(coordinates);
	}
	
	public ImageDetails(ImageDetails image)
	{
		copyFrom(image);
	}
	
	public void setImageid(int imageid) {
		this.imageid = imageid;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public FloatDimension getCoords() {
		 return coordinates;
	}
	public void setCoords(FloatDimension coordinates) {
		this.coordinates = new FloatDimension(coordinates.getX(),coordinates.getY());
	}
	
	public void copyTo(ImageDetails image) { //copy to separate object
		image.setImageid(this.getImageid());
		image.setDate(this.getDate());
		image.setLocation(this.getLocation());
		image.setCoords(this.getCoords());
		
	}
	public void copyFrom(ImageDetails image) { //copy from separate object
		this.setImageid(image.getImageid());
		this.setDate(image.getDate());
		this.setLocation(image.getLocation());
		this.setCoords(image.getCoords());
		
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public boolean isHasSample() {
		return hasSample;
	}

	public void setHasSample(boolean hasSample) {
		this.hasSample = hasSample;
	}
}
